import 'package:flutter/material.dart';

class Love extends StatefulWidget {
  Love({Key key, @required this.mt}) : super(key: key);
  @override
  LoveState createState() {
    return new LoveState();
  }

  final String mt;
}

// 有状态控件 ，必须结合一个状态管理类,来是实现
class LoveState extends State<Love> {
  var list = [];
  String baseUrl = 'https://cn.bing.com';
  // 渲染当前这个控件的结构
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
        body: new ListView.builder(
          padding: const EdgeInsets.all(16),
          itemCount: 5,
          itemBuilder: (context, i) {
            return new Image.asset('images/'+ (i + 1).toString() +'.png');
          }
        )
    );
  }
}
